export const param2Obj = url => {
  // http://localhost:8080/gethome?keyword=%E5%A4%8F%E5%88%9A&age=22&sex=1
  const search = url.split('?')[1] // {"keyword:小张,keyword:小张"}
  if (!search) {
    return {}
  }
  return JSON.parse('{"' + decodeURIComponent(search)
    .replace(/"/g, '\\"')
    .replace(/&/g, '","')
    .replace(/=/g, '":"') + '"}')
}
